package com.feri.fss.controller;

import com.feri.fss.common.vo.PageBean;
import com.feri.fss.common.vo.R;
import com.feri.fss.entity.Admin;
import com.feri.fss.entity.AdminLog;
import com.feri.fss.service.intf.AdminLogService;
import com.feri.fss.service.intf.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @author Feri
 * @date 2021/12/16 10:22
 * @description:TODO
 */
@Controller //IOC创建对象
@RequestMapping("/api/adminlog/") //配置url地址
public class AdminLogController {
    @Autowired
    private AdminLogService service;


    //新增
    @RequestMapping("save.do")
    @ResponseBody
    public R save(AdminLog admin){
        return service.save(admin);
    }
    //查询-分页
    @RequestMapping("page.do")
    @ResponseBody
    public PageBean page(int page, int limit){
        return service.queryPage(page, limit);
    }

}
